package entity;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;

/**
 * 试题类
 */
public class Question {
    // 题干
    private String context;
    // 选项 - 4
    private String[] select;
    // 正确答案 - n
    //private String right;
    private List<Integer> right;
    // 题目类型 - 单选、多选
    private String type;
    // 难度级别
    private int level;
    // 分数
    private int score;

    public Question() {

    }

    public static void main(String[] args) throws FileNotFoundException {
        String path = Question.class.getClassLoader().getResource("util").getPath();
        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(path)));
        String srt=new String();
    }

    public Question(String context, String[] select, List<Integer> right, String type, int level, int score) {
        this.context = context;
        this.select = select;
        this.right = right;
        this.type = type;
        this.level = level;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Question{" +
                "context='" + context + '\'' +
                ", select=" + Arrays.toString(select) +
                ", right='" + right + '\'' +
                ", type=" + type +
                ", level=" + level +
                ", score=" + score +
                '}';
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String[] getSelect() {
        return select;
    }

    public void setSelect(String[] select) {
        this.select = select;
    }

    public List<Integer> getRight() {
        return right;
    }

    public void setRight(List<Integer> right) {
        this.right = right;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
}
